package com.zxf.navigation.activity

import android.os.Bundle
import android.view.Window
import androidx.appcompat.app.AppCompatActivity
import androidx.navigation.findNavController
import androidx.navigation.ui.NavigationUI
import com.zxf.navigation.R
import kotlinx.android.synthetic.main.activity_navigation.*

class NavigationActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        requestWindowFeature(Window.FEATURE_NO_TITLE)
        setContentView(R.layout.activity_navigation)
        titlebar.onLeftClick = {
//            findNavController(R.id.hostFragment).popBackStack()
        }
    }

    fun updateTitle(title: String) {

    }

    override fun onSupportNavigateUp(): Boolean = findNavController(R.id.hostFragment).navigateUp()
}